package mapProperties;

import acm.graphics.GImage;

public class Entity extends GImage implements EntityConstants{

	public double x;
	public double y;
	public double xsize;
	public double ysize;
	
	public int health;
	public int passThrewIndex;

	public Entity(int health, int passThrewIndex, String picLocation){
		super(picLocation);
		
	}
	
	
	//===============================
	public boolean isDistroyed(){
		return (this.health <=0);		
	}
	//===============================
	public boolean isPassable(int opposingdamageindex){
		return (this.passThrewIndex < opposingdamageindex);
	}
	//============================
	public void doDamage(int yourDamageIndex){
		this.health = this.health - yourDamageIndex;
	}
	//============================

	
	
}
